In storage apparatuses each capable of storing therein an aggregate of data (information), for example, various measures are taken against a loss of information due to a failure. As one of the measures, for example, redundant arrays of inexpensive disks (RAID) method, in which the same block of data is stored in each of two storage devices, has been well known.
As related technologies existing prior to the application of the present invention, there are, for example, technologies disclosed in Patent Literature 1 to Patent Literature 3.
In Patent Literature 1, there is disclosed a technology related to a memory system as well as a control method for the memory system. The memory system disclosed in Patent Literature 1 is configured to, when performing a read or write processing, store a volatile piece of address information, which indicates a storage location of a block of data targeted for the read or write processing, into a cache memory. In this way, the memory system makes it possible to suppress that a capacity of the cache memory is increased, as compared with a case where storage locations of all stored blocks of data and logical addresses each associated with a corresponding one of the storage locations are stored in the cache memory. This Patent literature 1 is Japanese Unexamined Patent Application Publication No. 2012-128646.
In Patent Literature 2, there is disclosed a technology related to a storage device provided with rewritable non-volatile memory as well as a control method for non-volatile memory included in the storage device. The storage device disclosed in Patent Literature 2 is configured to, for each of a plurality of physical blocks provided inside non-volatile memory, in response to an operation of writing a set of data, store therein information indicating the number of the writing operations. Further, the storage device is configured to, in response to the operation of writing a set of data, refer to the stored writing operation number information. The storage device is configured to, when, as a result of the reference to the writing operation number information related to a physical block, the number of writing operations reaches a predetermined number, exchange the physical block targeted for the writing operation for another physical block. The storage device is configured to, when exchanging the physical block targeted for the writing operation for the another physical block, select a physical block which is different from anyone of already exchanged physical blocks and for which the number of writing operations is smaller than that of any other one of the physical blocks. In this way, the storage device makes it possible to equalize the number of writing operations among the plurality of the physical blocks. This Patent literature 2 is Japanese Unexamined Patent Application Publication No. 2004-326523.
In Patent Literature 3, there is disclosed a technology related to a memory failure reduction method in a semiconductor disk device. A semiconductor disk device disclosed in Patent Literature 3 is configured to count the number of accesses for each of a plurality of logical drives resulting from segmentation. The semiconductor disk device is configured to, upon occurrence of one bit error, count the number of occurrences of this error. The semiconductor disk device is configured to, when the number of accesses is larger than or equal to a predetermined number and, a ratio of occurrence of the error reaches a predetermined threshold value, start processing. That is, the semiconductor disk device is configured to exchange a set of information stored in the target logical drive for a set of data stored in another logical drive for which the number of accesses is smaller than that of any other one of the plurality of logical drives and, the number of occurrence of the error is smaller than that of any other one of the plurality of logical drives. In this way, the semiconductor disk device makes it possible to decrease the ratio of occurrences of a failure. In addition, the semiconductor disk is a solid state drive (SSD), and is referred to as an “SSD” in the following description of this patent application document. This Patent Literature 3 is Japanese Unexamined Patent Application Publication No. 1994-067816.
With respect to a storage apparatus, it is well known that the storage apparatus is provided with a group of caches for the purpose of carrying out a read processing and a write processing at higher speed. More specifically, for example, upon reception of a request for a read processing, the storage apparatus does not read a set of information from a hard disk drive, but reads it from a cache composed of SSDs. For such in the storage apparatus, there is a technology which utilizes an SSD capable of reading/writing a set of information at high speed, as a cache (also referred to as “a second cache”). In addition, in the following description of this patent application document, for the convenience of description, a hard disk drive will be referred to a “HDD”.
In the following description, more specifically, a generally known storage apparatus 210 will be described with reference to FIGS. 7 to 9. FIG. 7 is block diagram illustrating a configuration of the storage apparatus 210.
In FIG. 7, the storage apparatus 210 includes at least one HDD 230 each storing therein a set of information including data, as well as an SSD cash 220. The SSD cache 220 includes an SSD 221 and an SSD 222 each of which is superior in input/output (I/O) processing performance, as compared with the HDD 230.
In FIG. 7, when a write processing is carried out, a block of write data transmitted from a host computer 200 is cached into the SSD 221. The block of write data is stored in the HDD 230. When a read processing is carried out, a block of read data stored in the HDD 230 is cached into the SSD 222. The block of read data is transmitted to the host computer 200.
In the following description, for example, a case where a failure has occurred in the SSD 221 will be described with reference to FIG. 8.
FIG. 8 is a diagram conceptually illustrating a state in which, in the storage apparatus 210, a failure has occurred in the SSD 221. In addition, the configuration of the storage apparatus 210 shown in FIG. 8 is the same as that of the storage apparatus 210 shown in FIG. 7. Thus, detailed description of the configuration of the storage device 210 shown in FIG. 8 is omitted here.
In FIG. 8, when a failure has occurred in the SSD 221, the block of write data having been transmitted from the host computer 200 is not only stored in the HDD 230, but also the block of write data having been cached in the SSD 221 is also lost. That is, in such a generally known storage apparatus 210, the block of write data having been cached in the SSD 221 is lost and a data loss occurs.
Further, in the following description, for example, a case where a failure has occurred in the SSD 222 will be described with reference to FIG. 9.
FIG. 9 is a diagram conceptually illustrating a state in which, in the storage apparatus 210, a failure has occurred in the SSD 222. In addition, the configuration of the storage apparatus 210 shown in FIG. 9 is the same as that of the storage apparatus 210 shown in FIG. 7. Thus, detailed description of the configuration of the storage device 210 shown in FIG. 9 is omitted here.
In FIG. 9, when a failure has occurred in the SSD 222, the block of read data having been cached in the SSD 222 is stored in the HDD 230. Thus, even when a failure is occurred in the SSD 222, a data loss does not occur in the storage apparatus 210.
As described above, in such a generally known storage apparatus 210, when a failure has occurred in the SSD 221 which has cached the block of write data, the block of write data is likely not to be stored in the HDD 230. That is, in the storage apparatus 210, a data loss is likely to occur when the block of write data having been cached by the SSD 221 is not yet written into the HDD 230 from the SSD 221. Further, for example, even for a storage apparatus constituting a group of RAID, when multiple failures have occurred in SSDs, a data loss is likely to occur.
Further, a technology disclosed in each of patent literatures 1 to 3 is merely a disclosure of a technology for controlling the inside of an SSD. In anyone of patent literatures 1 to 3, any technology for allowing an SSD to operate as a cache is not disclosed and suggested. A technology disclosed in patent literature 1 is merely a technology for suppressing the increase of the capacity of the cache memory. Moreover, a technology disclosed in patent document 2 is merely a technology for equalizing the number of writing operations among physical blocks.
A technology disclosed in patent literature 3 is merely a technology for exchanging a logical drive by using the number of occurrences of an error and the number of accesses with respect to the logical drive. That is, in patent literature 3, any technology for building a write cache by preferentially using a high safety storage device is not taken into consideration, and is not described.
A main object of the present invention is to provide a cache control device and the like which makes it possible to, even when a failure is occurred in a cache, reduce a risk that information is lost due to the failure.